<?php

class ErrorLog
{
    public static function reportarError($id, $error, $mensage)
    {
    
       sfLogger::getInstance()->info("[ErrorLog] ... $id, $error, $mensage");
       
       if($id == 'errors')
       {
            $peticion = sfContext::getInstance()->getRequest();
            $peticion->setError($error, $mensage);
       }
       
       $user = sfContext::getInstance()->getUser();
       $user->setAttribute($id, $error." = ".$mensage);
       
    }
}

?>
